Room

interface Room

A class that provides the enter(), exit(), and other methods, which handle information about the room and operate with other types of objects such as a participant.

Since

1.6.0

Functions

addListener
Link copied to clipboard
abstract fun addListener(identifier: String, listener: RoomListener)

Adds a listener to receive events about a room.

delete
Link copied to clipboard
abstract fun delete(handler: CompletionHandler?)

Deletes the room. Calling this method will exit all participants inside the room.

deleteCustomItems
Link copied to clipboard
abstract fun deleteCustomItems(customItemKeys: Set<String>?, handler: CustomItemsHandler?)

Deletes custom items of the room.

enter
Link copied to clipboard
abstract fun enter(params: EnterParams, handler: CompletionHandler?)

Enters a room. The participant's audio or video can be configured with EnterParams when entering.

exit
Link copied to clipboard
abstract fun exit()

Exits a room.

fetchCustomItems
Link copied to clipboard
abstract fun fetchCustomItems(handler: CustomItemsHandler?)

Returns the list of custom items of the room.

removeAllListeners
Link copied to clipboard
abstract fun removeAllListeners()

Removes all listeners to stop receiving events about a room.

removeListener
Link copied to clipboard
abstract fun removeListener(identifier: String): RoomListener?

Removes a listener to stop receiving events about a room.

selectAudioDevice
Link copied to clipboard
abstract fun selectAudioDevice(audioDevice: AudioDevice, handler: CompletionHandler?)

Selects audio device.

sendInvitation
Link copied to clipboard
abstract fun sendInvitation(inviteeId: String, handler: RoomInvitationHandler?)

Send an invitation to the specified user to enter the room.

updateCustomItems
Link copied to clipboard
abstract fun updateCustomItems(customItems: Map<String, String>, handler: CustomItemsHandler?)

Updates custom items of the room.

Properties

availableAudioDevices
Link copied to clipboard
abstract val availableAudioDevices: Set<AudioDevice>

Gets available audio devices.

createdAt
Link copied to clipboard
abstract val createdAt: Long

The timestamp of when the room was created, in Unix milliseconds.

createdBy
Link copied to clipboard
abstract val createdBy: String

The ID of a user who created a room.

currentAudioDevice
Link copied to clipboard
abstract val currentAudioDevice: AudioDevice?

Gets current audio device.

customItems
Link copied to clipboard
abstract val customItems: Map<String, String>

A unique key-value pair of information stored in a room.

localParticipant
Link copied to clipboard
abstract val localParticipant: LocalParticipant?

Returns the local participant in a room.

participants
Link copied to clipboard
abstract val participants: List<Participant>

Returns the list of all participants in a room.

remoteParticipants
Link copied to clipboard
abstract val remoteParticipants: List<RemoteParticipant>

Returns the list of remote participants in a room.

roomId
Link copied to clipboard
abstract val roomId: String

Returns a room ID.

state
Link copied to clipboard
abstract val state: RoomState

The state of a room. Valid values are RoomState.OPEN and RoomState.DELETED.

type
Link copied to clipboard
abstract val type: RoomType

Indicates the room type as audio or video and the capacity of a room.